#!/bin/bash

# Stop your services
function stop_svc {
  /usr/jexus/jws stop >/dev/null 2>&1

  exit
}

# Set the SIGTREM signal response function
trap 'stop_svc' SIGTERM

# Start Your Services
#####################
/usr/jexus/jws start

# Waiting signal
####################
while true
do
  sleep 2
done

